<?php

class Admin_Form_Shortcut extends Zend_Form{//Admin_Form_BaseConfigForm{
	public function init(){
		parent::init();
        $translator = new Zend_Translate(
          'array',
          APPLICATION_PATH.'/../library/Nippy/languages/lang.ru.php',
          'ru',
          array('scan' => Zend_Translate::LOCALE_DIRECTORY)
        );
		Zend_Validate_Abstract::setDefaultTranslator($translator);
        $this->addElement('text', 'id', array(
            'label'      => 'ID:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => false,
        	'validators' => array('Int')
            )
        );
        $this->addElement('text', 'ShortcutId', array('required'   => true,'validators' => array('Int')));
        $this->addElement('checkbox', 'InMenu', array('required'   => false));
	}
    public function getValidValues($params){
		$params['InMenu'] = isset($params['InMenu'])? 1 : 0;
		return parent::getValidValues($params);
	}
}
?>